

// 全局混入 

import Vue from "vue"
import { footList } from "."
import { mapState, mapMutations } from "vuex"
import { reg } from "./validate"
import { http } from "@/api"
import { Notify } from "vant"
export function showerror(msg) {
  msg = msg || '出现异常'
  Notify({
    message: msg,
    color: '#ad0000',
    background: '#ffe1e1',
  });
}
Vue.mixin({
  data() {
    return {
      footList,
      reg,
      showerror
    }
  },
  computed: {
    ...mapState([
      'cartNum',
      'userInfo',
      'city',
      'cityList',
      'cinemaList'
    ])
  },
  methods: {
    ...mapMutations(['changeUserInfo', 'changeCity', 'changeCityList', 'changeCinemaList']),
    gotoPage(name, query, params) {
      this.$router.push({ name, query, params })
    }
  }
})